/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.bank;

/**
 *
 * @author Zeus
 */
public class AccountImpl implements Account {

    private int accountNumber;
    private double balance;

    @Override
    public void setAccountNumber(int accNum) {
        accountNumber = accNum;
    }

    @Override
    public int getAccountNumber() {
        return accountNumber;
    }

    @Override
    public double withdraw(double amount) {
        balance -= amount;
        return amount;
    }

    @Override
    public void deposit(double amount) {
        balance += amount;
    }

    @Override
    public double checkBalance() {
        return balance;
    }
}
